<div><botton onclick="print_prepackage(this)">打印</botton></div>
<php>echo $barcode</php>

<script src="__PUBLIC__/javascripts/admin/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="__PUBLIC__//javascripts/admin/layer/layer.js" type="text/javascript"></script>
<script>
    $(function(){
        var str = "<?php if(isset($log)){echo $log;}?>";
        if(str!=''){
            alert(str);
            return false;
        }
    })
    /*$(function(){
        var str = "<?php if(isset($log)){echo $log;}?>";
        if(str!=''){
            layer.msg(str);return;
        }
    })*/
    function print_prepackage(thisObj)
    {
        thisObj.parentNode.style.display='none';
        window.print();
        thisObj.parentNode.style.display='block';
        var id = "<?php echo $detail_id;?>";
        confirm("打印成功，确认返回吗");
    }
</script>